<%-- 
    Document   : formulario
    Created on : 23-jul-2012, 18:40:17
    Author     : Froy
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.Enumeration"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    response.setCharacterEncoding("UTF-8");
    if(request.getMethod().equals("POST")){
        Enumeration e = request.getParameterNames();
        while(e.hasMoreElements()){
            String parametro = String.valueOf(e.nextElement());
            out.write("<p>"+request.getParameter(parametro) +"</p>");
        }
    }
    Date fecha = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
    sdf.format(fecha);
    
    fecha.setTime(session.getCreationTime());
    
    
    out.write("<p>"+session.getId()+"</p>");
    out.write("<p>"+ fecha +"</p>");
    
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <form action="#" method="POST">
            <input type="text" name="nombre" />
            <input type="text" name="edad" />
            <input type="submit" value="Enviar" />
        </form>
    </body>
</html>
